<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增动力电池型号')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-model-add">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">型号名称：</label>
                    <div class="col-sm-8">
                        <input name="modelName" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">储能装置类型：</label>
                    <div class="col-sm-8">
                        <select name="energyStorageType" class="form-control" th:with="type=${@dict.getType('energy_storage_type')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">装电量 kWh：</label>
                    <div class="col-sm-8">
                        <input name="installedCapacityKwh" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">电池系统能量密度 Wh/kg：</label>
                    <div class="col-sm-8">
                        <input name="batterySystemEnergyDensity" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">储能装置总成质量 kg：</label>
                    <div class="col-sm-8">
                        <input name="energyStorageTotalMass" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">电池单体供应商：</label>
                    <div class="col-sm-8">
                        <select name="batteryCellSupplier" class="form-control" th:with="type=${@dict.getType('battery_company')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">电池系统供应商：</label>
                    <div class="col-sm-8">
                        <select name="batterySystemSupplier" class="form-control" th:with="type=${@dict.getType('battery_company')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">电池系统额定电压 V：</label>
                    <div class="col-sm-8">
                        <input name="batterySystemRatedVoltage" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">电池系统额定容量 Ah：</label>
                    <div class="col-sm-8">
                        <input name="batterySystemRatedCapacity" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">电池系统装电量 kWh：</label>
                    <div class="col-sm-8">
                        <input name="batterySystemInstalledCapacityKwh" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">驱动电机供应商：</label>
                    <div class="col-sm-8">
                        <select name="driveMotorSupplier" class="form-control" th:with="type=${@dict.getType('engine_company')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/model"
        $("#form-model-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-model-add').serialize());
            }
        }
    </script>
</body>
</html>